Skip to content

Create ride-share.rb#37

Open
antoniairizarry wants to merge 1 commit intoAda-C13:masterfrom
antoniairizarry:master
Open

Create ride-share.rb#37
antoniairizarry wants to merge 1 commit intoAda-C13:masterfrom
antoniairizarry:master

Conversation

@antoniairizarry
Copy link

Assignment Submission: Ride Share

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Question Answer
What did your data structure look like at first? Did this structure evolve over time? Why? I tried different configurations for the nested structure to determine which would be less convoluted to extract the information from.
What was your strategy for going through the data structure and gathering information? I iterated through the hash using .each to gather driver information and the corresponding number of rides. Using that same block I created two new hashes in order to store values from calculations and assign them to the appropriate driver.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? I stored the values gathered in determining the highest earner and highest rated drivers in order to interpolate them. All total values and all average ratings were stored in hashes that were created during iteration.
What kinds of iteration did you use? Did you use .map? If so, when? If not, why, or when would be a good opportunity to use it? I used .each, I had some difficulties using .map and getting everything to click. It could've used to in some of the calculations and in place of .each.
Were some calculations easier than others? Why? Gathering the number of rides was easy, but I had to take some time to think of how I was going to deal with getting the highest earner/highest rated driver.

@CheezItMan
Copy link

Ride Share

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Correctly creates, reads, and modifies variables ✔️
Correctly creates and accesses arrays ✔️
Correctly creates and accesses hashes ✔️
Reasonably organizes large amounts of related data into nested arrays and hashes ✔️
Correctly iterates through a nested data structure using loops and/or Enumerable methods ✔️
Reasonably organizes small pieces of code into methods, and calls/invokes those methods ✔️

Functional Requirements

Functional Requirement yes/no
To the terminal, the program outputs the correct number of rides each driver has given ✔️
... outputs the total amount of money each driver has made ✔️
... outputs the average rating for each driver ✔️
... outputs which driver made the most money ✔️
... outputs which driver has the highest average rating ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 4+ in Code Review && 3+ in Functional Requirements ✔️

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation ✅, I do think your hash definition is a bit long for 1 line. I would break it out into multiline output.
Elegant/Clever ✅, good use of the sum method.
Descriptive/Readable
Concise ✅, very compact
Logical/Organized

Summary

Nice work, you hit all the learning goals here. Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants